//
//  SceneObj.m
//  TodatPlay
//
//  Created by dllo on 16/09/02
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "SceneObj.h"
#import "SCeneCommentcountlist.h"
#import "ScenePraisecontainerlist.h"
#import "SceneUserlist.h"
#import "SceneStorylist.h"
#import "ScenePraiseinfolist.h"
#import "SceneCommentlist.h"

@implementation SceneObj

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"praiseContainerList"]) {
        NSMutableArray *arr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ScenePraisecontainerlist *list = [ScenePraisecontainerlist modelWithDic:dic];
            [arr addObject:list];
        }
        _praiseContainerList = arr;
        
    } else if ([key isEqualToString:@"commentCountList"]) {
        NSMutableArray *arr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            SCeneCommentcountlist *list = [SCeneCommentcountlist modelWithDic:dic];
            [arr addObject:list];
        }
        _commentCountList = arr;
        
    }else if ([key isEqualToString:@"userList"]) {
        NSMutableArray *arr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            SceneUserlist *list = [SceneUserlist modelWithDic:dic];
            [arr addObject:list];
        }
        _userList = arr;
        
    }else if ([key isEqualToString:@"storyList"]) {
        NSMutableArray *arr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            SceneStorylist *list = [SceneStorylist modelWithDic:dic];
            [arr addObject:list];
        }
        _storyList = arr;
        
    }else if ([key isEqualToString:@"praiseInfoList"]) {
        NSMutableArray *arr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ScenePraiseinfolist *list = [ScenePraiseinfolist modelWithDic:dic];
            [arr addObject:list];
        }
        _praiseInfoList = arr;
    }else if ([key isEqualToString:@"commentList"]) {
        NSMutableArray *arr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            SceneCommentlist *list = [SceneCommentlist modelWithDic:dic];
            [arr addObject:list];
        }
        _commentList = arr;
    }
}

@end
